package com.aishang.shopback_2005.dao;

import com.aishang.shopback_2005.po.Category;
import com.aishang.shopback_2005.po.Categorysecond;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.MyMapper;

import java.util.List;

public interface CategoryMapper extends MyMapper<Category> {
    /**
     * 查询一级类目集合
     * @return
     */
    @Select("select * from category")
    List<Category> getCategories();

    /**
     * 根据一级类目cid 查询二级类目
     * @param cid
     * @return
     */
    @Select("select * from categorysecond where cid=#{cid}")
    List<Categorysecond> getCategortSeconds(Integer cid);
}